package com.jozen.smart_toilet_system.ui.man_remaining_urinal_pool_tag_view;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.jozen.smart_toilet_system.R;

/**
 * 剩余男便池
 */
public class ManRemainingUrinalPoolTagView extends RelativeLayout {
    private Context context;
    private static int viewWidth = 0, viewHeight = 0;
    private static LinearLayout ll_man_urinal_pool;
    private ImageView iv_icon;
    private TextView tv_urinal_pool_val;

    public ManRemainingUrinalPoolTagView(Context context) {
        super(context);
        this.context = context;
        initViews();
    }

    private void initViews() {
        LayoutInflater.from(context).inflate(R.layout.zt_man_urinal_pool_tag_layout, this, true);
        ll_man_urinal_pool = (LinearLayout) findViewById(R.id.ll_man_urinal_pool);
        iv_icon = (ImageView) findViewById(R.id.iv_icon);
        tv_urinal_pool_val = (TextView) findViewById(R.id.tv_urinal_pool_val);
    }


    public static int getViewWidth() {
        if (ll_man_urinal_pool != null) {
            viewWidth = ll_man_urinal_pool.getWidth();
        }
        return viewWidth;
    }

    public static int getViewHeight() {
        if (ll_man_urinal_pool != null) {
            viewHeight = ll_man_urinal_pool.getHeight();
        }
        return viewHeight;
    }

    /**
     * 设置数据源
     */
    public void setData() {
        // TODO: 2023/9/25 等接口那边定义数据结构再实现
    }
}
